-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dot/rpc: implement RPC methods chain_getHeader and chain_getBlock #745
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleanup GetBlockHash, otherwise looks good!
also, could you update node/gssmr/defaults.go to include "chain" in DefaultRPCModules
?
I think this is ready now... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Looks good to me. You can base the pull request off your other branch until it is merged if you want to separate the code in the pull request but not necessary, just something I like to do.
…om/ChainSafe/gossamer into ed/309_implement-rpc-chain-methods
* refactor to use gorilla/rpc lib * introduce gorilla rpc package * address lint issues * implement GetHeader chain rpc func * added getBlock rpc call * add test for chain getBlock and getHeader * added TODO issue #744 to comments * fix spelling, remove extra logging, add chain to default * go fmt-ed * refactor to use gorilla/rpc lib * address lint issues * implement GetHeader chain rpc func * added getBlock rpc call * add test for chain getBlock and getHeader * added TODO issue #744 to comments * fix spelling, remove extra logging, add chain to default * go fmt-ed * fix merge issues
Changes
Tests:
Unit tests:
Interactive testing, start node:
Interact with node via RPC, call chain_getHeader for latest header
Interact with node via RPC, call chain_getHeader for hash
Similar for calls to chain_getBlock
Issues:
This code introduces bug described in issue #744